
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Secret Content</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #1a1a1a, #0a192f);
            color: #fff;
            margin: 0;
            padding: 20px;
            min-height: 100vh;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .media-section {
            background: rgba(0, 0, 0, 0.3);
            border-radius: 10px;
            padding: 20px;
            margin: 20px 0;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .media-title {
            font-size: 24px;
            color: #64ffda;
            margin-bottom: 20px;
        }

        .media-player {
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
            border-radius: 8px;
            overflow: hidden;
        }

        video, audio {
            width: 100%;
            border-radius: 8px;
            background: rgba(0, 0, 0, 0.5);
        }

        .controls {
            margin-top: 10px;
            display: flex;
            gap: 10px;
            justify-content: center;
        }

        button {
            background: #64ffda;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
        }

        button:hover {
            background: #45e6c4;
            transform: scale(1.05);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="media-section">
            <h2 class="media-title">视频播放</h2>
            <div class="media-player">
                <video id="myVideo" controls>
                    <source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
                    您的浏览器不支持视频标签。
                </video>
            </div>
        </div>

        <div class="media-section">
            <h2 class="media-title">音频播放</h2>
            <div class="media-player">
                <audio id="myAudio" controls>
                    <source src="https://www.w3schools.com/html/horse.ogg" type="audio/ogg">
                    您的浏览器不支持音频标签。
                </audio>
            </div>
        </div>
    </div>

    <script>
        // 添加视频和音频的自动播放控制
        const video = document.getElementById('myVideo');
        const audio = document.getElementById('myAudio');

        // 添加视频结束时的事件监听
        video.addEventListener('ended', function() {
            console.log('视频播放结束');
            // 可以在这里添加视频结束后的操作
        });

        // 添加音频结束时的事件监听
        audio.addEventListener('ended', function() {
            console.log('音频播放结束');
            // 可以在这里添加音频结束后的操作
        });
    </script>
</body>
</html>


